package tn.bergaoui.openwebapp.wicket;

import org.apache.wicket.Application;
import org.apache.wicket.protocol.http.HttpSessionStore;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.session.ISessionStore;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;

import tn.bergaoui.openwebapp.wicket.pages.HomePage;

public class WicketApplication extends WebApplication {

	
    @Override
    public Class<?> getHomePage() {
        return HomePage.class;
    }

     @Override
    protected void init() {
    	super.init();
        addComponentInstantiationListener(new SpringComponentInjector(this));
        getResourceSettings().setResourcePollFrequency(null);
    }

     
    @Override
    public String getConfigurationType() {
        return Application.DEVELOPMENT;
       //  return Application.DEPLOYMENT;
    }

    protected ISessionStore newSessionStore() {
        return new HttpSessionStore(this);
        // return new SecondLevelCacheSessionStore(this, new DiskPageStore());
    }

}
